FROM ubuntu:22.04
maintainer "lsc 2603485744@qq.com"
RUN apt update &&  apt install gcc make libpcre3-dev zlib1g-dev libssl-dev -y
ADD nginx-1.24.0.tar.gz /usr/local/src/
RUN cd /usr/local/src/nginx-1.24.0 &&  ./configure --prefix=/apps/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-pcre --with-stream --with-stream_ssl_module --with-stream_realip_module && make && make install && useradd nginx -u 2022
ADD nginx.conf /apps/nginx/conf/nginx.conf
ADD code.tar.gz /apps/nginx/html
EXPOSE 80 443
# CMD [ "tail","-f","/etc/hosts" ]
CMD [ "/apps/nginx/sbin/nginx","-g","daemon off;" ]